
package com.srcptit.java.tranning.hoangdd.btvn1;

import java.util.Scanner;

public class Bai1Muc1{
	public static boolean ngto(int n){
		if(n<2)
			return false;
		for(int i=2; i<=Math.sqrt(n); i++)
			if(n%i==0) 
				return false;
		return true;
	}
	
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		System.out.print("Nhap vao so nguyen n = ");
                int n = sc.nextInt();
		if(ngto(n) == true)
			System.out.println(n+ " la so nguyen to ");
		else
			System.out.println(n+ " KO la so nguyen to ");
	}
	
}
